<?php


class view
{
  protected $css_file;
  protected $viewdir;
  protected $linkController;
  protected $actionControllerName;

  public function __construct() {
    $this->setCSS("model/style.css");
  }
  
  public function setCSS($css_f) {
    $this->css_file = $css_f;
  }
  
  public function getCSS() {
    return $this->css_file;
  }
  
  public function setActionControllerName($name) {
    $this->actionControllerName = $name;
  }

  public function getActionControllerName() {
    return $this->actionControllerName;
  }
  
  public function setLinkController($link_controller) {
    $this->linkController = $link_controller;
  }
  
  public function setViewDirectory($view_dir) {
//	  echo $view_dir;
    $this->viewdir = $view_dir;
  }
  
  public function getViewDirectory() {
    return $this->viewdir;
  }
  
  public function invoke() {
    $this->start_invoke();
    $this->leftside_invoke();
    $this->do_invoke();
    $this->rightside_invoke();
    $this->end_invoke();
  }
  
  public function getTitle() {
    return "Default title";
  }
  
  protected function start_invoke() {
   include $this->viewdir . '/header_base.php';
   include $this->viewdir . '/header.php';
  }
  
  protected function end_invoke() {
   include $this->viewdir . '/footer.php';
  }

  protected function rightside_invoke() {
    include include $this->getViewDirectory() . '/rightside.php';
  }

  protected function leftside_invoke() {
    include include $this->getViewDirectory() . '/leftside.php';
  }

  protected function do_invoke() {
    include include $this->getViewDirectory() . '/centralside.php';
  }
}

?>

